#include <stdio.h>

int main(){
    int n, m;
    int l, r;
    long long map[111] = {0}, next_map[111] = {0};
    int i, j;
    scanf("%d%d", &n, &m);
    map[0] = 1;
    while (n--) {
        scanf("%d%d", &l, &r);
        for (i = 0; i <= 100; i++) {
            next_map[i] = 0;
        }
        for (i = l; i <= r; i++) {
            for (j = 0; j < 100; j++) {
                next_map[i + j] += map[j];
            }
        }
        for (i = 0; i <= 100; i++) {
            map[i] = next_map[i];
        }
    }
    printf("%lld", map[m]);
    return 0;
}
